package com.ddsso.auth.web.vo;

/**
 * @author zdd
 * @package com.ddsso.auth.web.vo
 * @Time Created by zdd on 2016/11/2.
 * @description To-do
 */
public class AuthResponse {
    private boolean success;

    /**
     * 响应码
     */
    private int code;

    /**
     * 响应结果中文描述
     */
    private String message;

    /**
     * 响应数据
     */
    private Object data;

    public boolean isSuccess() {
        return success;
    }

    public int getCode() {
        return code;
    }

    public AuthResponse setCode(int code) {
        this.code = code;
        this.success = (code == AuthResponseCode.SUCCESS.getCode());
        return this;
    }

    public String getMessage() {
        return message;
    }

    public AuthResponse setMessage(String message) {
        this.message = message;
        return this;
    }

    public Object getData() {
        return data;
    }

    public AuthResponse setData(Object data) {
        this.data = data;
        return this;
    }
}
